# Gather all *.cpp and *.h files into their respective variables
file(GLOB SRCS "*.cpp")
file(GLOB HEADERS "*.h")

add_library( ${PROJECT_NAME} SHARED ${SRCS})
set_target_properties(${PROJECT_NAME} PROPERTIES
   INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/obrsp/lib
)

install( TARGETS ${PROJECT_NAME} DESTINATION obrsp/lib )
install( FILES ${HEADERS} DESTINATION obrsp/include/linalg )
install( FILES matlab/MxConversion.h DESTINATION obrsp/include/linalg/matlab )

message( STATUS "Will build shared library: ${PROJECT_NAME}" )